package org.ResearchProject.service.serviceImpl;

import org.ResearchProject.mapper.StudentMapper;
import org.ResearchProject.pojo.Student;
import org.ResearchProject.pojo.User;
import org.ResearchProject.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * 2024-12-13-12:58
 */
@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    StudentMapper studentMapper;
    @Override
    public void addStudent(User user) {
        studentMapper.addStudent(user);
    }

    @Override
    public Student selectByUsername(String username) {
        return studentMapper.selectByUsername(username);
    }

    @Override
    public void updateStudent(User user) {
        studentMapper.updateStudent(user);
    }

    @Override
    public ArrayList<Student> selectAll() {
        return studentMapper.selectAll();
    }

    @Override
    public ArrayList<Student> conditionSelect(Student student) {
        return studentMapper.conditionSelect(student);
    }

    @Override
    public Student selectByUseId(Integer studentId) {
        return studentMapper.selectByUseId(studentId);
    }

    @Override
    public Student selectByOpenid(String openid) {
        return studentMapper.selectByOpenid(openid);
    }
}
